package cn.nxcoder.jmw.mq.activemq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @author xiaqing
 */
@Component
public class TopicConsumer2 {
    private static final Logger LOG = LoggerFactory.getLogger(TopicConsumer2.class);

    @JmsListener(destination = "test.topic", containerFactory = "myJmsListenerContainerFactory")
    public void receiveTopicMsg(String msg) {
        LOG.info("Topic-Consumer2 收到的订阅消息为: {}", msg);
    }
}
